home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-17 | 1.6 KB | 72 lines | [TEXT/ttxt] |
- *************************
- * *
- * Event - DecButton.DClick *
- *************************
- Procedure PBDemo.DecButton.DClick()
- Do PBDemo.DecButton.Click
- Return
-
- *************************
- * *
- * Event - DecButton.Click *
- *************************
- Procedure PBDemo.DecButton.Click()
-
- If BarPosition >0
- * Reduce the position of the progress bar by 10%
- Sub BarPosition,10
- Do Draw_Bar
- Endif
- Return
-
- *************************
- * *
- * Event - IncButton.DClick *
- *************************
- Procedure PBDemo.IncButton.DClick()
- Do PBDemo.IncButton.Click
- Return
-
- *************************
- * *
- * Event - IncButton.Click *
- *************************
- Procedure PBDemo.IncButton.Click()
-
- If BarPosition <100
- * Increase the position of the progress bar by 10%
- Add BarPosition,10
- Do Draw_Bar
- Endif
- Return
-
- *************************
- * *
- * Event - PBDemo.OnClose *
- *************************
- Procedure PBDemo.OnClose()
- PBDemo.CloseWindow
- End
- Return
-
- *************************
- * *
- * Procedure Draw_Bar *
- *************************
- Procedure Draw_Bar() Public
- Local RectSize As Integer
- Local BarWidth As Integer
-
- * Calculate how wide the Container Rectangle is
- RectSize=PBDemo.ContainerRect.Width-2
-
- * Calculate the new width of the progress bar
- BarWidth=(RectSize*BarPosition)/100
-
- PBDemo.Bar.Width=BarWidth
- Return
-
-
-
-
-